<?php

	class WS_AnnouncementCon {
		
		private $DBADMIN;
		private $HASHID;
		
		public function __construct() {

			$this->DBMOD 	= new WS_AnnouncementMod();
			$this->HASHID 	= sha1(time());

		}
		
		public function insertAnnouncementActivities($strArray) {
			
			return $this->DBMOD->insertAnnouncementActivities($strArray);

		}
		
		public function updateAnnouncementActivities($strArray, $strID) {
			
			return $this->DBMOD->updateAnnouncementActivities($strArray, $strID);

		}
		
		public function deleteAnnouncement($strID) {
			
			return $this->DBMOD->deleteAnnouncement($strID);
			
		}
		
		public function getListAnnouncementCount($strDeptID, $strAdvising = 0) {
			
			$result = $this->DBMOD->getListAnnouncement($strDeptID, $strAdvising);
			
			return count($result);
			
		}
		
		public function getListAnnouncement($strDeptID, $strAdvising = 0) {
			
			return $this->DBMOD->getListAnnouncement($strDeptID, $strAdvising);
			
		}
		
		public function getAllDeptAnnouncement($strDeptID) {
			
			return $this->DBMOD->getAllDeptAnnouncement($strDeptID);
			
		}
		
		public function getAnnouncement($strAnnounceID) {
			
			return $this->DBMOD->getAnnouncement($strAnnounceID);
			
		}
		
	}
?>